home *** CD-ROM | disk | FTP | other *** search
- Path: swidir.switch.ch!epflnews!news
- From: Niels Hilbrink <niels@imacsg2.epfl.ch>
- Newsgroups: comp.lang.c++
- Subject: Re: Q: how to create an Object without creating the whole object
- Date: Tue, 12 Mar 1996 14:59:29 +0100
- Organization: EPFL
- Message-ID: <31458341.794B@imacsg2.epfl.ch>
- References: <31454EC9.167E@imacsg2.epfl.ch>
- NNTP-Posting-Host: imacsg2.epfl.ch
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
-
- hmm Sorry to waste presious webspace but I found My answer
- >
- > something like:
- >
- > Aobj = (A*) new A::B()
- >
- > But this doen't work, can anybody tell me what will ?
- >
- > oh yeah this works of course :
- > Bobj = new B;
- >
- > Aobj = (A*) Bobj;
- >
-
-
- Aobj = (A*) new B
-
-
-
- --
-
- The most overlooked advantage to owning a computer is
- that if they foul up there's no law against wacking
- them around a little.
-
- ------------------------------------------------------------
- Koen D'Hondt Niels Hilbrink
- koen@dutlhs1.lr.tudelft.nl niels@dutlcc3.lr.tudelft.nl
-
- **** Ripley Software Development ****
- (finger niels@dutlcc3.lr.tudelft.nl for more information.)
- ------------------------------------------------------------
-